From da881a89ab6d8bce2c796989850761a83d118de0 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 8 Feb 2009 15:34:38 +0000 Subject: [PATCH] (w32_hide_hourglass): Handle case where frame disappeared while hourglass was displayed. (Bug #2193) --- src/w32fns.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/w32fns.c b/src/w32fns.c index 70964cb8667..16649cce2cb 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5279,9 +5279,18 @@ w32_hide_hourglass () { struct frame *f = x_window_to_frame (&one_w32_display_info, hourglass_hwnd); + if (f) + f->output_data.w32->hourglass_p = 0; + else + /* If frame was deleted, restore to selected frame's cursor. */ + f = SELECTED_FRAME (); + + if (FRAME_W32_P (f)) + SetCursor (f->output_data.w32->current_cursor); + else + /* No cursors on non GUI frames - restore to stock arrow cursor. */ + SetCursor (w32_load_cursor (IDC_ARROW)); - f->output_data.w32->hourglass_p = 0; - SetCursor (f->output_data.w32->current_cursor); hourglass_shown_p = 0; } } -- 2.30.2